﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NLBS.Web.UI;
using NLBS.Web;

namespace NLBS.Control
{
    public partial class register : BaseUserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (BlogInfo.EnableRegister == 0)
            {
                ShowError("注册已关闭");
                return;
            }
            if (BlogInfo.CurrentUser.GroupID != 2)
            {
                ShowError("你已经注册");
                return;
            }
            ShowRegisterPanel();
        }


        private void ShowRegisterPanel()
        {
            string act = RequestWrapper.GetQueryString("act");
            switch (act)
            {
                case "":
                    messageboxPanel.Visible = true;
                    break;
                case "agree":
                    formboxPanel.Visible = true;
                    break;
                case "save":
                    successBox.Visible = true;
                    break;
            }
        }
    }
}